Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: seed docs script #231

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

chore: seed docs script #231

wants to merge 10 commits into from

Conversation

jbmoelker
Copy link
Member

@jbmoelker jbmoelker commented Dec 21, 2024

Changes

  • Adds seed script documentation, creating (or updating) CMS records for all docs/*.md files.
  • Adds a documentation page (if none exists; with slug documentation) and uses it as a parent page.
  • Adds a page partial (if none exists; titled "Documentation index") as a convenient list of links to all documentation pages.
  • Note: dependencies are kept outside root package.json to resolve conflicts. Also the seed dependencies are not needed for other projects using Head Start.

Associated issue

Related to #27, though that issue is mainly about seeding required content.

How to test

  1. Check out this feature branch
  2. Run npm run seed:docs (you may want to switch to a new sandbox environment for this)
  3. Verify the docs are added to the current DatoCMS environment (in ./datocms-environment.ts)
  4. Update a documentation file
  5. Re-run the script
  6. Verify the related record in the CMS is updated
  7. Review the documentation pages in the browser
  8. Verify links in the pages (relative and external) work correctly

Checklist

  • I have performed a self-review of my own code
  • I have made sure that my PR is easy to review (not too big, includes comments)
  • I have made updated relevant documentation files (in project README, docs/, etc)
  • I have added a decision log entry if the change affects the architecture or changes a significant technology
  • I have notified a reviewer

Dependencies outside root package.json to resolve conflicts. Also the seed dependencies are not needed for other projects using Head Start.

to do:
- better link replacement in md files
- add a partial listing all documents?
Copy link

cloudflare-workers-and-pages bot commented Dec 21, 2024

Deploying head-start with  Cloudflare Pages  Cloudflare Pages

Latest commit: f23b16f
Status:🚫  Build failed.

View logs

@jbmoelker jbmoelker added help wanted Extra attention is needed needs refinement and removed needs refinement labels Dec 21, 2024
@jbmoelker jbmoelker marked this pull request as ready for review January 2, 2025 16:08
@Siilwyn Siilwyn mentioned this pull request Feb 5, 2025
@jbmoelker jbmoelker removed the help wanted Extra attention is needed label Feb 5, 2025
Siilwyn and others added 4 commits February 9, 2025 18:56
- **chore: seed docs script**
- **fix: page record item type in seed docs script**
- **chore: resolve links in seed docs**
- **refactor: seed docs as standalone script**
- **chore: seed documention parent page**
- **chore: seed documentation partial as nav for docs**
- **Add DatoCMS "config" as workspace**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants